import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/login/login.vue'
import home from '@/views/home/home.vue'
import company from '@/views/home/company/company.vue'
import question from '@/views/home/question/question.vue'
import find from '@/views/home/find/find.vue'
import my from '@/views/home/my/my.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    // alias: '/',
    component: login
  },
  {
    path: '/home',
    component: home,
    redirect: '/home/my',
    children: [
      {
        path: '/home/company',
        component: company
      },
      {
        path: '/home/question',
        component: question
      },
      {
        path: '/home/find',
        component: find
      },
      {
        path: '/home/my',
        component: my
      }
    ]
  }
]

export default new VueRouter({
  routes
})
